package com.itydl.a03qq;

import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.view.View;
import android.widget.Toast;

import com.itydl.a03qq.view.BubbleMesTouchListener;
import com.itydl.a03qq.view.MsgBubbleView;

public class MainActivity extends AppCompatActivity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);

        MsgBubbleView.attachView(findViewById(R.id.tv),new BubbleMesTouchListener.OnBubbleDisappear(){

            @Override
            public void disappear(View view) {
                //回调告知拖拽的View消失了
                Toast.makeText(getApplicationContext(),"爆炸了！！",Toast.LENGTH_SHORT).show();
            }
        });
        MsgBubbleView.attachView(findViewById(R.id.btn),new BubbleMesTouchListener.OnBubbleDisappear(){

            @Override
            public void disappear(View view) {
                //回调告知拖拽的View消失了
                Toast.makeText(getApplicationContext(),"爆炸了！！",Toast.LENGTH_SHORT).show();
            }
        });

    }
}
